package com.hqyj.mana.enums;


/**
 * http响应数据状态code
 * @author BeFondOfTaro
 * Created in 12:43 2018/1/18
 */
public enum ResultEnum {

    UNKNOWN_ERROR(-1, "未知错误"),
    SUCCESS(0,"成功"),
    PARAM_ERROR(1, "参数不正确"),
    LOGIN_FAILED(2, "登录失败"),
    USER_NOT_FOUND(3, "用户不存在"),
    PASSWORD_INCORRECT(4, "用户名或密码不正确"),
    INVALID_TOKEN(5, "无效的token"),
    UNAUTHORIZED(6, "没有权限"),
    DUPLICATE_USERNAME(7, "用户名重复"),
    DELETE_FAILED(8, "删除失败"),
    DATABASE_ERROR(9,"数据库错误"),
    RESOURCE_NOT_FOUND(10, "资源不存在"),
    USER_EXIST(11,"用户已存在"),
    UPDATE_STATE_FAILED(12,"状态更新失败"),
    ADD_FAILED(13,"添加失败"),
    ADD_REPEAT(14,"重复添加"),
    TEAM_DELETED(15,"队伍已被删除"),
    RESOURCE_EXIST(16, "资源已存在"),
    TRANSFORM_ERROR(17,"转换数据格式失败"),
    ADD_TEAM_FAILED(18,"添加团队失败"),
    TEAM_NOT_EXIST(19,"团队不存在"),
    UPLOAD_IMG_FAILED(20,"图片上传失败"),
    ADD_TEAM_REPEAT(21,"队名重复"),
    DELETE_IMG_FAILED(22,"图片删除失败"),
    SEND_MESSAGE_FAILED(23,"消息发送失败"),
    MESSAGE_BLANK(24,"必填信息为空，请检查后重新输入"),
    ALTER_ORDERSTAGE_REPEAT(52,"错误：在同一状态重复提交");
    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }}
